#include <my_header.h>
// 数据从用户进程输出到内核区域
/* Usage: ./5_write filename */
int main(int argc, char *argv[]){                                  
    ARGS_CHECK(argc, 2);
    // 以读写模式打开文件
    int fd = open(argv[1], O_RDWR);
    ERROR_CHECK(fd, -1, "open");
    // 将字符串字面值字符串写到文件中
    ssize_t sret = write(fd, "how are you", 11);
    printf("sret = %ld\n", sret);
    //关闭文件描述符
    close(fd);
    return 0;
}

